package com.itheima.类和对象;

public class Student {
    private int id;
    private String name;

    //无参构造方法
    public Student() {
    }

    //多个参数的构造方法
    public Student(int id, String name) {
        this.id = id;
        this.name = name;
    }

    //get和set
    public void setId(int id) {
        this.id = id;
    }
    public int getId() {
        return id;
    }

    public void setName(String name) {
        this.name = name;
    }
    public String getName() {
        return name;
    }

    //show()
    public void show() {
        System.out.println(id + " " + name);
    }
}
